#include <unistd.h>
#include <stdio.h>

int main(void){
	pid_t pid;
	pid=fork();
	if(pid==-1){
		printf("fork error\n");
	}
	else if(pid==0){
		printf("the returned value is %d\n",pid);
		printf("in child process!!\n");
		printf("My PID is %d\n",getpid());
	}
	else{
		printf("the returned value is %d\n",pid);
		printf("in father process!!\n");
		printf("My PID is %d\n",getpid());
	}
	return 0;
	}
    